#pragma once

#include <deque>
#include <vector>
#include <map>
#include "ICC_Timer_Handler.h"
#include "GameBase.h"
#include "CClient.h"
#include "def.h"
#include "LogicData.h"
#include "MarkupSTL.h"
#include "2100_agency_event.pb.h"

class CHost;
class CGameServer : public BYTimerOject
{
public:
	CGameServer();
	virtual ~CGameServer();
public:
	virtual bool InitGame();
	virtual int OnBYTimeOut(int Timerid);
	int ProcessPacket(SocketHandler * pHandler, NETInputPacket* inputPkg);
	bool ReadCommonConf(const char* strxml);

public:
	void ProcGet(SocketHandler* pHandler, NETInputPacket* inputPkg);
	void ProcRefreshConfig(SocketHandler* pHandler, NETInputPacket* inputPkg);
	void ProcGetAgencyId(SocketHandler* pHandler, NETInputPacket* inputPkg);

public:
	void OnAgencyEventUpdate(const agency_event_proto::AgencyEvent& agencyevent);

public:
	CHost* m_pHost;
};

